<!DOCTYPE html>
<html>
<head> 
	<title>用户列表</title>

</head>

<body>
<?php 
 header("content-type:text/html;charset=utf-8");
 ?>
 <table align="center" width="80%" border=1> 
  <center><h3>用户列表</h3></center>
  <center><h3><a href="index1.php?c=geshou&m=listgeshous">歌手列表</a></h3></center>
 <tr>
   <th>用户编号</th>
   <th>用户名</th>   
   <th>性别</th>
   <th>生日</th>
   <th>爱好</th>
   <th>学历</th>
   <th>自我介绍</th> 
   <th width='80'>头像</th>
   <th>操作<a href="index1.php?c=user&m=userform">添加</a></th>
 </tr>
 <?php
  foreach ($data['users'] as $key => $value1)
   {
      
     echo '<tr>';
     echo '<td>'.$value1['uid'].'</td>';
     echo '<td>'.$value1['uname'].'</td>';  
     echo '<td>'.($value1['gender']==0?'男':'女').'</td>';
     echo '<td>'.$value1['birthdate'].'</td>';
     echo '<td>'.$value1['hobby'].'</td>';
     switch($value1['degree'])
     {
       case '1':$dg = "高中";break;
       case '2':$dg = "大学";break;
       case '3':$dg = "研究生";break;
       case '4':$dg = "博士生";break;
       default: $dg="不知道";
     }
     echo '<td>'.$dg.'</td>';
     echo '<td>'.$value1['intro'].'</td>';      
     echo '<td align="center"><img src='.'images/'.$value1['pic'].' width=60 height=80></td>';  
     echo '<td><a href="index1.php?c=user&m=edituser&uid='.$value1['uid'].'">修改</a>| 
     <a href="index1.php?c=user&m=deluser&uid='.$value1['uid'].'" onClick="return confirm(\'确定要删除吗？\');">删除</a></td>';
     echo '</tr>';  
  }
     echo '</table>'; 
 ?>
</body>
</html>
